import { PLATFORM_NAME, PLATFORM_ORG } from '../../plugins/constant'

export default {
  path: '/',
  component: () => import(/* webpackChunkName: "gov-app" */ '@/gov/views/Layout.vue'),
  redirect: { name: 'credit_index' },
  meta: { root: true, title: PLATFORM_NAME, org: PLATFORM_ORG },
  children: [
    {
      path: 'credit',
      component: { render: h => h('router-view') },
      redirect: { name: 'credit_index' },
      meta: { title: '信用服务', icon: 'fa fa-fw fa-home', hidden: true },
      children: [
        {
          path: 'index',
          name: 'credit_index',
          component: () =>
            import(/* webpackChunkName: "gov-index" */ '@/gov/views/index/Index.vue'),
          meta: { title: '主页', icon: 'fa fa-home' },
        },
        {
          path: 'category',
          component: { render: h => h('router-view') },
          meta: { title: '产业管理', icon: 'fa fa-list-ul' },
          children: [
            {
              path: 'cate',
              name: 'category_cate',
              component: () =>
                import(/* webpackChunkName: "gov-category" */ '@/gov/views/category/Index.vue'),
              meta: { title: '产品包信息' },
            },
            {
              path: 'industry',
              name: 'category_industry',
              component: () =>
                import(/* webpackChunkName: "gov-category" */ '@/gov/views/category/Industry.vue'),
              meta: { title: '产业主体' },
            },
            {
              path: 'statistic',
              name: 'category_statistic',
              component: () =>
                import(/* webpackChunkName: "gov-category" */ '@/gov/views/category/Statistic.vue'),
              meta: { title: '分类统计' },
            },
          ],
        },
        {
          path: 'program',
          component: { render: h => h('router-view') },
          meta: { title: '融资申请', icon: 'fa fa-users' },
          children: [
            {
              path: 'list',
              name: 'program_list',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/program/List.vue'),
              meta: { title: '适度规模' },
            },
            {
              path: 'industry',
              name: 'program_industry',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/program/CreditGoods.vue'),
              meta: { title: '产品包融资' },
            },
          ],
        },
        {
          path: 'files',
          component: { render: h => h('router-view') },
          meta: { title: '建档立卡', icon: 'fa fa-address-card' },
          children: [
            {
              path: 'list',
              name: 'files_list',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/files/List.vue'),
              meta: { title: '适度规模' },
            },
            {
              path: 'industry',
              name: 'files_industry',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/files/Industry.vue'),
              meta: { title: '产业建档' },
            },
          ],
        },
        {
          path: 'business',
          component: { render: h => h('router-view') },
          meta: {
            title: '项目管理',
            icon: 'fa fa-sticky-note',
          },
          children: [
            {
              path: 'panel',
              component: () =>
                import(/* webpackChunkName: "gov-business" */ '@/gov/views/business/Index.vue'),
              meta: {
                title: '项目跟踪',
                keepAlive: true,
              },
              children: [
                {
                  path: '',
                  redirect: 'home',
                  meta: { title: '' },
                },
                {
                  path: 'home',
                  name: 'missionHome',
                  component: {
                    render: h =>
                      h('i', {
                        class: 'fa fa-fw fa-spinner fa-pulse text-muted',
                      }),
                  },
                  meta: { title: '', hidden: true },
                },
                {
                  path: 'recomment',
                  name: 'missionRecomment',
                  component: () =>
                    import(
                      /* webpackChunkName: "gov-business" */ '@/gov/views/business/Recommend.vue'
                    ),
                  meta: { title: '项目推荐', hidden: true, keepAlive: true },
                },
                {
                  path: 'noclaim',
                  name: 'missionNclaim',
                  component: () =>
                    import(
                      /* webpackChunkName: "gov-business" */ '@/gov/views/business/progress/ClaimNo.vue'
                    ),
                  meta: { title: '未认领项目', hidden: true, keepAlive: true },
                },
                {
                  path: 'yesclaim',
                  name: 'missionYclaim',
                  component: () =>
                    import(
                      /* webpackChunkName: "gov-business" */ '@/gov/views/business/progress/ClaimPass.vue'
                    ),
                  meta: { title: '已认领项目', hidden: true, keepAlive: true },
                },
                {
                  path: 'yesfunds',
                  name: 'missionYfunds',
                  component: () =>
                    import(
                      /* webpackChunkName: "gov-business" */ '@/gov/views/business/progress/FundsLoad.vue'
                    ),
                  meta: { title: '已放款项目', hidden: true, keepAlive: true },
                },
                {
                  path: 'nofunds',
                  name: 'missionNfunds',
                  component: () =>
                    import(
                      /* webpackChunkName: "gov-business" */ '@/gov/views/business/progress/FundsRefuse.vue'
                    ),
                  meta: { title: '已拒绝项目', hidden: true, keepAlive: true },
                },
                {
                  path: 'normal',
                  name: 'missionNormal',
                  component: () =>
                    import(
                      /* webpackChunkName: "gov-business" */ '@/gov/views/business/loanben/normalProject.vue'
                    ),
                  meta: { title: '在保项目', hidden: true, keepAlive: true },
                },
              ],
            },
            {
              path: 'postloan',
              name: 'postloan_list',
              component: () =>
                import(
                  /* webpackChunkName: "city-self-after" */ '@/credit/views/city/self/after/Index.vue'
                ),
              meta: { title: '贷后详情', hidden: true },
            },
            {
              path: 'white',
              name: 'business_white',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/business/WhiteList.vue'),
              meta: { title: '产业白名单' },
            },
            {
              path: 'black',
              name: 'business_black',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/business/BlackList.vue'),
              meta: { title: '产业黑名单' },
            },
          ],
        },
        {
          path: 'datas',
          component: { render: h => h('router-view') },
          redirect: { name: 'datas_ic' },
          meta: { title: '数据管理', icon: 'fa fa-file-text' },
          children: [
            {
              path: 'ic',
              name: 'datas_ic',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/datas/IC.vue'),
              meta: { title: '工商数据' },
            },
            {
              path: 'family',
              name: 'datas_family',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/datas/Family.vue'),
              meta: { title: '家庭成员' },
            },
            {
              path: 'scale',
              name: 'datas_scale',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/datas/Scale.vue'),
              meta: { title: '经营规模' },
            },
            {
              path: 'insurance',
              name: 'datas_insurance',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/datas/Insurance.vue'),
              meta: { title: '保险信息' },
            },
            {
              path: 'subsidy',
              name: 'datas_subsidy',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/datas/Subsidy.vue'),
              meta: { title: '补贴数据' },
            },
            {
              path: 'power',
              name: 'datas_power',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/datas/Power.vue'),
              meta: { title: '用电数据' },
            },
            {
              path: 'machinery',
              name: 'datas_machinery',
              component: () =>
                import(/* webpackChunkName: "gov-datas" */ '@/gov/views/datas/Machinery.vue'),
              meta: { title: '农机数据' },
            },
          ],
        },
      ],
    },
  ],
}
